package com.example.onlinereadingsystem.demos.web.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.onlinereadingsystem.demos.web.dto.domain.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.onlinereadingsystem.demos.web.dto.request.GetNovelChildCommentsParam;
import com.example.onlinereadingsystem.demos.web.dto.request.GetNovelMainCommentsParam;
import com.example.onlinereadingsystem.demos.web.dto.request.MyCommentParam;
import com.example.onlinereadingsystem.demos.web.dto.vo.GetNovelChildCommentsItemVo;
import com.example.onlinereadingsystem.demos.web.dto.vo.GetNovelMainCommentsItemVo;
import com.example.onlinereadingsystem.demos.web.dto.vo.MyCommentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 27935
 * @description 针对表【comment】的数据库操作Mapper
 * @createDate 2024-12-11 15:09:32
 * @Entity com.example.onlinereadingsystem.demos.web.dto.domain.Comment
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {

    /**
     * @auther ljm
     * @create 2024/12/16
     * @describe 获取小说主评论列表
     */
    List<GetNovelMainCommentsItemVo> getMainComments(@Param("param") GetNovelMainCommentsParam param);

    /**
     * @auther ljm
     * @create 2024/12/19
     * @describe 获取小说子评论列表
     */
    List<GetNovelChildCommentsItemVo> getChildComments(@Param("param") GetNovelChildCommentsParam param);

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 获取我的全部评论
     */
    Page<MyCommentVo> getAllMyComments(@Param("param") MyCommentParam param, Page<MyCommentVo> page);

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 获取我的回复评论
     */
    Page<MyCommentVo> getReplyComments(@Param("param") MyCommentParam param, Page<MyCommentVo> page);

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 获取我的被回复评论
     */
    Page<MyCommentVo> getRepliedComments(@Param("param") MyCommentParam param, Page<MyCommentVo> page);
}




